<?php

namespace App\Models;


class Role extends Model
{
    protected $table = 'roles';

    public function permissions()
    {
        return $this->belongsToMany('App\Models\Permission', 'role_permission', 'role_id', 'permission_id')->withPivot(
            ['role_id', 'permission_id']
        );
    }


}
